<template>
	<view class="content">
		<view class="title">{{gonggao.title}}</view>
		<!-- <view class="time">{{gonggao.createTime}}</view> -->
		<view class="detail-box">
			<!-- <rich-text :nodes="gonggao.message" class="messge"></rich-text> -->
			<mp-html :content="gonggao.message" />
		</view>
	</view>
</template>

<script>
	import mpHtml from '@/components/mp-html/mp-html'
	export default {
		data() {
			return {
				gonggao:{}
			}
		},
		methods: {
			
		},
		onLoad(opt) {
			this.$http.get('/pp_tongzhi/getTongzhiById', {
				ggid:opt.id,
			}).then(res => {
				this.gonggao = res.data.data;
				var reg = /\"\/image/g;
				this.gonggao.message = this.gonggao.message.replace(reg,'"'+this.host+'/image');
			})
		},
		components:{
			mpHtml
		}
	}
</script>

<style scoped>
	.title{
		text-align: center;
		color: red;
		font-size: 34rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}
	.detail-box .messge img{
		max-width: 100rpx !important;
	}
	.time{
		text-align: center;
		color: #ccc;
		font-size: 24rpx;
		margin-bottom: 10rpx;
	}
</style>
